package com.fast.web.utils;

import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

/**
 * 基础测试类 <br>
 * 
 * @author Tonny Luo
 *
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext.xml", "classpath:spring-servlet.xml"})
@WebAppConfiguration
public class SpringMvcTestBase {
	protected final Logger log = LoggerFactory.getLogger(getClass());

	/*
	 * 一些公用的“初始化”代码
	 */
	@Before
	public void before() {
		log.info("[---------------------Test Start---------------------]");
	}

	/**
	 * 一些公用的“销毁”代码
	 */
	@After
	public void after() {
		log.info("[---------------------Test Ended---------------------]");
	}
}
